package com.bclz.cat.nouniquekey;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;


public class CatMapper1 extends Mapper<LongWritable,Text,IntWritable,Text> {



    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {

        String s = value.toString();
        String[] split = s.split(",");

        if(split.length>2){

            context.write(new IntWritable(Integer.parseInt(split[0])),new Text(s));

        }

    }


}
